package com.nanhai.buddhist.college.module.collegebase.api.collegeclass;

import com.nanhai.buddhist.college.framework.common.pojo.CommonResult;
import com.nanhai.buddhist.college.framework.common.pojo.PageResult;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.dto.ClassesBaseInfoDTO;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.dto.ClassesInfoDTO;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.dto.ClassesParentInfoDTO;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.dto.ClassesRespDTO;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.vo.ClassesInfoDTOPageVO;
import com.nanhai.buddhist.college.module.collegebase.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;


@Api(tags = "RPC 服务 - 班级数据提供")
@FeignClient(name = ApiConstants.NAME)
public interface CollegeClassApi {

    String PREFIX = ApiConstants.PREFIX + "/classes";

    @GetMapping(PREFIX + "/list")
    @ApiOperation("获得教室数据")
    CommonResult<List<ClassesRespDTO>> getClassesList(@RequestParam("ids") Collection<String> ids);


    @GetMapping(PREFIX + "/getClassesByTeacher")
    @ApiOperation("获得教室数据")
    CommonResult<List<String>> getClassesByTeacher(@RequestParam("teacherId") String teacherId);


    @GetMapping(PREFIX + "/info")
    @ApiOperation("获取教室详情")
    CommonResult<ClassesInfoDTO> getClassesInfoDTOById(@RequestParam("classesId") String classesId);


    @GetMapping(PREFIX + "/byTeacher/List")
    @ApiOperation("根据教师id获取班级列表")
    CommonResult<List<ClassesInfoDTO>> getClassesInfoDTOListByTeacher(@RequestParam("teacherId") String teacherId);


    @GetMapping(PREFIX + "/byTeacher/page")
    @ApiOperation("根据教师id获取班级列表 (分页)")
    CommonResult<PageResult<ClassesInfoDTO>> getClassesInfoDTOPageByTeacher(@RequestParam("req") ClassesInfoDTOPageVO req);


    /**
     * 根据班级获取 上层的数据 如， 班级， 专业，系部， 学院
     * @param classesIds
     * @return
     */
    @GetMapping(PREFIX + "/ClassesParentInfoDTOByIds")
    @ApiOperation("根据班级获取 上层的数据")
    CommonResult< List<ClassesParentInfoDTO>> getClassesParentInfoDTOByClassesIds(@RequestParam("classesId") Collection<String> classesIds);
    /**
     * 根据班级获取 上层的数据 如， 班级， 专业，系部， 学院
     * @param classesId
     * @return
     */
    @GetMapping(PREFIX + "/ClassesParentInfoDTOById")
    @ApiOperation("根据班级获取 上层的数据")
    CommonResult< ClassesParentInfoDTO> getClassesParentInfoDTOByClassesId(@RequestParam("classesId") String classesId);



    @GetMapping(PREFIX + "/selectClassBaseInfoByCollegeIds")
    @ApiOperation("根据学院获取所有数据")
    CommonResult<List<ClassesBaseInfoDTO>> selectClassBaseInfoByCollegeIds(@RequestParam("collegeIds")Collection<String> collegeIds);


    @GetMapping(PREFIX + "/selectClassBaseInfoByProfessionIds")
    @ApiOperation("根据专业id查询班级")
    CommonResult<List<ClassesBaseInfoDTO>> selectClassBaseInfoByProfessionIds(@RequestParam("professionIds")Collection<String> professionIds);


}